//
//  UIButton+Extension.swift
//  weibo
//
//  Created by chengqiang on 16/7/24.
//  Copyright © 2016年 chengqiangBiaodashi. All rights reserved.
//

import UIKit

extension UIButton {

    convenience init(imageName:String,title:String,titlColor:UIColor=UIColor.darkGrayColor(),titleFont:CGFloat=15,backImagName:String="timeline_card_bottom_background"){
        self.init()
        
        self.setImage(UIImage(named:imageName), forState: UIControlState.Normal)
        self.setTitleColor(titlColor, forState: UIControlState.Normal)
        self.setTitle(title, forState: UIControlState.Normal)
        self.setBackgroundImage(UIImage(named: backImagName ), forState: UIControlState.Normal)
        self.setBackgroundImage(UIImage(named:backImagName + "_highlighted"), forState: UIControlState.Highlighted)
    
}


}
